﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using common;

namespace myframework.time.数据库
{
    public class Class1
    {
        public static void do1(){
            string strCon = @"User ID=sa;Password=111111;Initial Catalog=KBS_REMOTE;Data Source=DBJB0019\ZR;Max Pool Size=1000;DATABASE=KBS_REMOTE";

            SqlServerHelper.strConnString = strCon;
            string strSql = "select * from sys.sysdatabases ";

            System.Data.SqlClient.SqlDataReader thisReader = SqlServerHelper.GetReader(strSql);

            DataTable dt1 = new DataTable();
            dt1.Columns.Add("数据库");

            while (thisReader.Read())
            {
                DataRow dr1 = dt1.NewRow();
                dr1[0] = thisReader[0].ToString();
                dt1.Rows.Add(dr1);
                Console.WriteLine(dr1[0].ToString());
               
            }

          
            thisReader.Close();

        
        }

        public static string do2() {
            int ii = 11;
            return ii.ToString();
        }
    }
}
